class repo:
    def __init__(self):
        self.data = []
        self.msg = ""

    def success(self, msg="success", data=None):
        if data is not None:
            self.data = data
        self.msg = msg
        return {"msg": self.msg, "stat": 200, "data": self.data}

    def fail(self, msg, data=None):
        if data is not None:
            self.data = data
        return {"msg": msg, "stat": 500, "data": self.data}
